<? include ("../init.php") ?>
<? include ("../header.php") ?>
<? include ("../menu.php") ?>
<? include ("submenu.php") ?>

<div id = "body">

<h1><?_l('Edit Member')?></h1>
<div class = "clear"></div>

<?
  $m_id = $_GET['m_id'];
  $sql = "SELECT * FROM hs_member WHERE m_id = $m_id";
  $line = $db->queryUniqueObject($sql);
?>

<form method="post" action="update.php" class = "form">

  <input type = "hidden" value = "<?=$m_id?>" name = "m_id">

  <div class = "field"><label><?_l('First Name :')?></label><input type = "text" name = "f_name" class = "input size1" value = "<?=$line->m_name?>"></div>
  <div class = "field"><label><?_l('Last Name :')?></label><input type = "text" name = "l_name" class = "input size1" value = "<?=$line->m_lastname?>"></div>
  <div class = "field">
    <label><?_l('Level :')?></label>
    <select name="level">
      <option value="1" <?php if($line->m_level==1){ echo 'selected="selected"'; } ?>>General</option>
      <option value="2" <?php if($line->m_level==2){ echo 'selected="selected"'; } ?>>Gold</option>
    </select>
  </div>
  <div class = "field"><label><?_l('Company Name :')?></label><input type = "text" name = "c_name" class = "input size1"  value = "<?=$line->m_company?>"></div>
  <div class = "field"><label><?_l('Position :')?></label><input type= "text" name = "position" class = "input size1"  value = "<?=$line->m_position?>"></div>
  <div class = "field"><label><?_l('Email Address :')?></label><input type= "text" name = "email" class = "input size1"  value = "<?=$line->m_email?>"></div>
  <div class = "field"><label><?_l('Password :')?></label><input type= "text" name = "password" class = "input size1" ></div>
  <div class = "field"><label><?_l('Phone :')?></label><input type= "text" name = "phone" class = "input size1"  value = "<?=$line->m_phone?>"></div>
  <div class = "field"><label><?_l('URL :')?></label><input type = "text" name = "url" class = "input size1"  value = "<?=$line->m_url?>"></div>
  <div class = "field"><label><?_l('Shipping Address :')?></label><input type = "text" name = "address" class = "input size1"  value = "<?=$line->m_address?>"></div>
  <div class = "field"><label><?_l('City :')?></label><input type = "text" name = "city" class = "input size1"  value = "<?=$line->m_city?>"></div>
  <div class = "field"><label><?_l('Zip/Postal Code :')?></label><input type = "text" name = "post_code" class = "input size1"  value = "<?=$line->m_postcode?>"></div>
  <div class = "field"><label><?_l('State :')?></label><input type = "text" name = "state" class = "input size1" value = "<?=$line->m_state?>"></div>
  <div class = "field"><label><?_l('Country :')?></label><input type = "text" name = "country" class = "input size1" value = "<?=$line->m_country?>"></div>
  <div class = "field"><label><?_l('Receive newsletter :')?></label><input type = "checkbox" name = "newsletter" <?php echo ($line->m_enews ? 'checked="checked"' : ''); ?> value="1"></div>
  <div class = "field"><label><?_l('Confirm :')?></label><input type = "checkbox" name = "confirm" <?php echo ($line->m_confirm ? 'checked="checked"' : ''); ?> value="1"></div>
  <div class = "field"><label><?_l('How to know Hong chiao? :')?></label><input type = "text" name = "know" class = "input size1" value = "<?=$line->m_knowhow?>"></div>
  
  <div class = "field"><label></label>
    <input type="submit" name="save" value="<?_l('submit')?>" class = "btn" />
    <input onclick = "javascript:history.back(1)" type = "button" value="<?_l('cancel')?>" class = "btn" />
  </div>
</form>

</div>

<style>
  .form label {
    width:120px;
  }
</style>

<? include ("../footer.php") ?>